package cn.fl.warrant.service;

import java.util.ArrayList;
import java.util.List;

import cmm.mid.core.framework.page.KeyValueVO;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.fl.warrant.vo.ArcReceiptMainVO;
import fl.warrant.facade.archive.condition.ArcReceiptConditionRQueryCondition;
import fl.warrant.facade.archive.condition.ArcReceiptDetailQueryCondition;
import fl.warrant.facade.archive.condition.ArcReceiptMainQueryCondition;
import fl.warrant.facade.archive.dto.ArcReceiptConditionRDTO;
import fl.warrant.facade.archive.dto.ArcReceiptDetailDTO;
import fl.warrant.facade.archive.dto.ArcReceiptMainDTO;

/**
 * @Description: 交接单主表 客户端服务层接口
 * @Description: 持久层方法名称前缀：新增：insert* 删除：delete* 修改：update* 批量：batch* 查询对象：select* get* find* 查询集合：select*
 * @Description: 业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
 */
public interface IArcReceiptMainService {
	
	/**
	 * 根据字段代码组获取代码值集合
	 * @param grpCd 代码组值
	 * @param sysCd 系统代码
	 * @param orgCd 组织结构代码
	 * @return 值
	 * @throws BaseException
	 */
	public List<KeyValueVO> getKvList(String grpCd) throws BaseException;
	
	 /**
	 * 根据字段代码组获取代码值集合
	 * @param grpCd 代码组值
	 * @param sysCd 系统代码
	 * @param orgCd 组织结构代码
	 * @return 值
	 * @throws BaseException
	 */
	public List<KeyValueVO> getKvDescList(String grpCd) throws BaseException;
		
		
	/**
	 * 获取唯一对象
	 * @param id 主键
	 * @return 对象DTO
	 */
	public ArcReceiptMainVO selectById(Long id)throws BaseException;
	
	/**
	 * 新增
	 * @param entity
	 * @return
	 */
    public Long add(ArcReceiptMainVO entity) throws BaseException;

    /**
     * 删除
     * @param id
     * @return
     */
    public boolean removeById(Long id)throws BaseException;

    /**
     * 修改
     * @param entity
     * @return
     */
    public boolean update(ArcReceiptMainVO entity)throws BaseException;

    /**
     * 分页查询所有
     * @param page
     * @return
     */
    public Pager searchListPage(Pager page)throws BaseException;
    /**
	 * 查询交接单筛选条件
	 */
	public List<ArcReceiptConditionRDTO> searchArcReceiptConditionRList(
			ArcReceiptConditionRQueryCondition condition) throws BaseException ;
	
	public List<ArcReceiptMainDTO> searchList(ArcReceiptMainQueryCondition condition) throws BaseException;
	
	 /**
     * 修改交接单
     * @param entity
     * @return
     */
    public boolean updateArcReceiptMain(ArcReceiptMainVO entity)throws BaseException;
    public int updateCurrentVersion(ArcReceiptMainVO vo) throws BaseException;

	public List<ArcReceiptDetailDTO> arcReceiptDetailList(ArcReceiptDetailQueryCondition qc) throws BaseException;
	/**
	 * 归档筛选列表
	 * @param condition
	 * @return
	 * @throws BaseException
	 * 2018年3月16日 
	 * lxb
	 */
	public List<ArcReceiptMainVO> selectListForMgr(ArcReceiptMainQueryCondition condition) throws BaseException;

	public Long getMaxVersion(String receiptNo) throws BaseException;

	
	public List<ArcReceiptMainVO> checkArcReceiptR(
			ArcReceiptMainQueryCondition qc) throws BaseException;
}
